<?php
class Form_Tour extends Zend_Form
{
    public function __construct($options=array())
    {
		parent::__construct($options);
		
		$this->addPrefixPath('Lion_Form_Element', '../library/Form/Element/', 'element');
		
		$tour_title = $this->addElement('text', 'tour_title', array(
            'label'      => 'Tour Title:',
            'filters'    => array('StringTrim'),
            'class'			 => 'input-2',
            'validators' => array(
            	array('validator' => 'StringLength', 'options' => array(0, 100))
            )
        ));
        
        $no_days = $this->addElement('text', 'no_days', array(
            'label'      => 'No. of Days:',
            'filters'    => array('StringTrim'),
            'class'		 => 'input-2',
            'validators' => array(
            	array('validator' => 'StringLength', 'options' => array(0, 3))
            )
        ));
        
		$no_nights = $this->addElement('text', 'no_nights', array(
            'label'      => 'No. of Nights:',
            'filters'    => array('StringTrim'),
            'class'			 => 'input-2',
            'validators' => array(
            	array('validator' => 'StringLength', 'options' => array(0, 3))
            )
        ));
        
        $tour_description = $this ->addElement('formRTE', 'tour_description',
    				array('label' =>'Tour Description:',
    					'validators' =>array(
    					array('validator' =>'StringLength', 'options' =>array(0, 1000))
    				),
		));
		
		
		/*$this->addElement('textarea', 'tour_includes',
	        array('label' =>'Tour Includes:',
	        'rows' => 5,
	        'cols' => 85
	        )
        );*/
		
		$tour_includes = $this->addElement('formRTE', 'tour_includes',
    				array('label' =>'Tour Includes:',
    					'validators' =>array(
    					array('validator' =>'StringLength', 'options' =>array(0, 1000))
    				),
		));
        
        /*$this->addElement('textarea', 'tour_excludes',
	        array('label' =>'Tour Excludes:',
	        'rows' => 5,
	        'cols' => 85
	        )
        );*/
        
        $tour_excludes = $this->addElement('formRTE', 'tour_excludes',
    				array('label' =>'Tour Excludes:',
    					'validators' =>array(
    					array('validator' =>'StringLength', 'options' =>array(0, 1000))
    				),
		));
        
       	$status = new Zend_Form_Element_Select('status');
        $status ->setLabel('Status')
		 			 ->addMultiOptions(array(
		 			    '' => 'Select Status',            
						1 => 'Published',
						0 => 'Unpublished'));
		$status->setOptions(array('class'=>'input-2'));				
		$this->addElement($status);	
		
		if(!empty($options))
		{
    		if($options['action'] == "edit")
    		{ 
        	   	$this->addElement('hidden', 'tour_id', array(	            
        	            'filters'  => array('int'),
        	            'class'	   => 'hidden',
        	            'value'    => $options['tour_id'],	            
        	    ));
    		}
		}		
    }
}
